check_PROGRAMS= psrand1 perseus_test perseus_test2 alea_test 

LDADD=$(top_builddir)/src/libperseus.la $(LIBPERSEUS_ARCH_LIBS)
AM_CPPFLAGS=-I$(top_srcdir)/src -I$(top_srcdir)/utils

psrand1_SOURCES= psrand1.c

perseus_test_SOURCES= perseus_test.c

perseus_test2_SOURCES= perseus_test2.c

alea_test_SOURCES=alea_test.c

TESTS= \
perseus-test-509.sh \
perseus-test-1024.sh \
perseus-test-2039.sh \
perseus-test2-64.sh \
perseus-test2-131.sh \
perseus-test2-251.sh

EDIT= sed \
        -e 's,@bindir[@],$(bindir),g' \
        -e 's,@exec_prefix[@],$(exec_prefix),g' \
        -e 's,@prefix[@],$(prefix),g' \
        -e 's,@top_builddir[@],$(top_builddir),g' \
        -e 's,@srcdir[@],$(srcdir),g' 

%.sh: Makefile $(srcdir)/%.sh.in
	rm -f $@ $@.tmp
	$(EDIT) '$(srcdir)/$@.in' >$@.tmp
	mv $@.tmp $@
	chmod +x $@

$(TESTS): functions.sh

EXTRA_DIST=\
functions.sh.in \
perseus-test-509.sh.in \
perseus-test-1024.sh.in \
perseus-test-2039.sh.in \
perseus-test2-64.sh.in \
perseus-test2-131.sh.in \
perseus-test2-251.sh.in
